package com.itlong.cloud.property.resource;

import com.itlong.cloud.POJO.DTO.property.PropertyInspectOperateDTO;
import com.itlong.cloud.POJO.VO.property.PropertyInspectOperateVO;
import com.itlong.cloud.inspect.IPropertyInspectOperateServiceClient;
import com.itlong.cloud.property.service.IPropertyInspectOperateService;
import com.itlong.cloud.utils.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <desc>
 *      巡检操作暴露接口实现类
 * </desc>
 *
 * @createDate 2019/12/26
 */
@RestController
public class PropertyInspectOperateResource implements IPropertyInspectOperateServiceClient {

    @Autowired
    private IPropertyInspectOperateService iPropertyInspectOperateService;

    /**
     * <desc>
     *      列表查询历史数据信息
     * </desc>
     *
     * @return 列表数据
     * @author wangzhi
     * @createDate 2019/12/26
     */
    @Override
    @PostMapping(path = "property/inspect/operate/getHistoricalDataPage")
    public Page<PropertyInspectOperateVO> getHistoricalDataPage(@RequestBody PropertyInspectOperateDTO propertyInspectOperateDTO) throws Exception {
        return iPropertyInspectOperateService.getHistoricalDataPage(propertyInspectOperateDTO);
    }

    /**
     * <desc>
     *      列表查询巡检报告数据信息
     * </desc>
     *
     * @return 列表数据
     * @author wangzhi
     * @createDate 2019/12/30
     */
    @Override
    @PostMapping(path = "property/inspect/operate/getReportPage")
    public Page<PropertyInspectOperateVO> getReportPage(@RequestBody PropertyInspectOperateDTO propertyInspectOperateDTO) throws Exception {
        return iPropertyInspectOperateService.getReportPage(propertyInspectOperateDTO);
    }

    /**
     * <desc>
     *      查询统计数据信息
     * </desc>
     *
     * @return 统计数据信息
     * @author wangzhi
     * @createDate 2020/01/02
     */
    @Override
    @PostMapping(path = "property/inspect/operate/getStatisticsData")
    public List<PropertyInspectOperateVO> getStatisticsData(@RequestBody PropertyInspectOperateDTO propertyInspectOperateDTO) throws Exception {
        return iPropertyInspectOperateService.getStatisticsData(propertyInspectOperateDTO);
    }

    /**
     * <desc>
     *      巡检日历列表查询
     * </desc>
     *
     * @return 巡检日历列表
     * @author wangzhi
     * @createDate 2020/01/06
     */
    @Override
    @PostMapping(path = "property/inspect/operate/getCalendarPage")
    public Page<PropertyInspectOperateVO> getCalendarPage(@RequestBody PropertyInspectOperateDTO propertyInspectOperateDTO) throws Exception {
        return iPropertyInspectOperateService.getCalendarPage(propertyInspectOperateDTO);
    }

    /**
     * <desc>
     *      查看巡检日历数据信息详情
     * </desc>
     *
     * @return 巡检日历数据信息详情
     * @author wangzhi
     * @createDate 2020/01/06
     */
    @Override
    @PostMapping(path = "property/inspect/operate/getCalendarDetails")
    public Page<PropertyInspectOperateVO> getCalendarDetails(@RequestBody PropertyInspectOperateDTO propertyInspectOperateDTO) throws Exception {
        return iPropertyInspectOperateService.getCalendarDetails(propertyInspectOperateDTO);
    }

    /**
     * <desc>
     *      报警数据列表查询
     * </desc>
     *
     * @return 报警数据列表
     * @author wangzhi
     * @createDate 2020/01/07
     */
    @Override
    @PostMapping(path = "property/inspect/operate/getAlarmPage")
    public Page<PropertyInspectOperateVO> getAlarmPage(@RequestBody PropertyInspectOperateDTO propertyInspectOperateDTO) throws Exception {
        return iPropertyInspectOperateService.getAlarmPage(propertyInspectOperateDTO);
    }
}
